import request from '@/utils/request'

// 查询仓位信息列表
export function listLocate(query) {
  return request({
    url: '/locates/locate/list',
    method: 'get',
    params: query
  })
}

// 查询仓位信息详细
export function getLocate(locateId) {
  return request({
    url: '/locates/locate/' + locateId,
    method: 'get'
  })
}

// 新增仓位信息
export function addLocate(data) {
  return request({
    url: '/locates/locate',
    method: 'post',
    data: data
  })
}

// 修改仓位信息
export function updateLocate(data) {
  return request({
    url: '/locates/locate',
    method: 'put',
    data: data
  })
}

// 删除仓位信息
export function delLocate(locateId) {
  return request({
    url: '/locates/locate/' + locateId,
    method: 'delete'
  })
}

// 查询仓位信息字典项
export function listLocateOption(parentId) {
  return request({
    url: '/locates/locate/listoption/'  + parentId,
    method: 'get',
//    params: query
  })
}
